package com.fowo.api.model.product.ingredients;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 关联辅料表 导入导出辅助模型 */
@Getter
@Setter
public class ProductIngredientsExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属辅料管理")
  private String accessoriesIdName;

  @ExcelIgnore
  @ExcelProperty(value = "所属辅料管理")
  private Long accessoriesId;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属产品")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "所属产品")
  private Long productId;

  @ExcelProperty(value = "产品图片", converter = ImageConvert.class)
  private List<SysFile> picUrl;

  @Size(max = 50, message = "产品SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "产品SKU")
  private String productSku;

  @Size(max = 50, message = "产品名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "产品名称")
  private String productName;

  @Size(max = 50, message = "辅料名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "辅料名称")
  private String accessoriesName;

  @Size(max = 50, message = "辅料Sku长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "辅料Sku")
  private String accessoriesSku;

  @Size(max = 10, message = "单位成本长度不能超过20")
  @ExcelProperty(value = "单位成本")
  private java.math.BigDecimal purchaseCost;

  @Size(max = 10, message = "主料数量长度不能超过20")
  @ExcelProperty(value = "主料数量")
  private Integer accessoriesQuantity;

  @ExcelProperty(value = "辅料数量")
  private Integer producQuantity;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
